/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package resources;

import java.util.Locale;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author 
 */
public class ResorceLocale extends ResurcesBase implements Resources {

    private Locale locale;
    private ResourceBundle resourceBundle;
    public ResorceLocale() {
    }

    public void  getResourceBundleLocale(Locale locale) {
        try {
            resourceBundle = getResourceBundle().getBundle(getBaseName(), locale, ResurcesUtil.getClassLoader());
        } catch (Exception ex) {
            Logger.getLogger(ResorceLocale.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }

    public String getValue(String value) {
            return  resourceBundle.getString(value);
    }

    public Locale getLocale() {
        return locale;
    }

    public void setLocale(Locale locale) {
        this.locale = locale;
    }
}
